<template>
  <div class="box" id="attachment">
    <attachment :code="code" :fujianObjList="fujianObjList"></attachment>
  </div>
</template>

<script>
import { queryProjectResultAuditInfo } from "@/api/ghsjAndssfaPingShen";
import attachment from "@/components/attachment";
export default {
  components: {
    attachment
  },
  data() {
    return {
      fujianObjList:[],
      code:'X_M_G_H_S_J',
    };
  },
  mounted() {
    this.getFujian();
  },
  methods: {
    //获取附件列表
    getFujian() {
      const loading = this.$loading({
          lock: true,
          text: "Loading",
          spinner: "el-icon-loading",
          background: "rgba(0, 0, 0, 0.7)"
      });
      var data = {
        projectId: localStorage.getItem("projectId")
      };
      queryProjectResultAuditInfo(data).then(res => {
        loading.close()
        if(res.data){
          var arr = []
          arr.push({title:'附件',list:res.data.projectTextAccessoryList})
          arr.push({title:'图件-布局图',list:res.data.engineeringMapList})
          arr.push({title:'图件-单体图',list:res.data.oneMapList})
          arr.push({title:'图件-规划图',list:res.data.planningMapList})
          
          this.fujianObjList = arr
        }
      }).catch(err =>{
        loading.close()
      });
    },
  }
};
</script>

<style lang="scss">

</style>
